<?php

class m130831_052347_add_fields_to_goods_table extends CDbMigration
{
	public function up()
	{
        $this->addColumn('{{goods}}', 'start_time', 'int NOT NULL');
        $this->addColumn('{{goods}}', 'end_time', 'int NOT NULL');
        $this->addColumn('{{goods}}', 'suggest_by', 'string NOT NULL');
        $this->addColumn('{{goods}}', 'suggest_reason', 'string NOT NULL');
	}

	public function down()
	{
        $this->dropColumn('{{goods}}', 'start_time');
        $this->dropColumn('{{goods}}', 'end_time');
        $this->dropColumn('{{goods}}', 'suggest_by');
        $this->dropColumn('{{goods}}', 'suggest_reason');
		echo "m130831_052347_add_fields_to_goods_table does not support migration down.\n";
		return true;
	}

	/*
	// Use safeUp/safeDown to do migration with transaction
	public function safeUp()
	{
	}

	public function safeDown()
	{
	}
	*/
}
